package com.qf.commns;

public class RespData {
    private String msg;
    private Integer code;
    private Object data;

    private RespData(String msg,Integer code,Object data ){
        this.msg = msg;
        this.code = code;
        this.data = data;
    }

    public static RespData ok(){
        return new RespData("success",200,null);
    }

    public static RespData error(){
        return new RespData("error",300,null);
    }
    public static RespData errorData(String msg){
        return new RespData(msg,300,null);
    }

    public  static RespData okData(String msg,Object data){
        return new RespData(msg,200,data);
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
